<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      >



        <ui:composition template="./WEB-INF/includes-templates/template.xhtml">
            <ui:param name="pageTitle" value="#{trans.system_name}" />
            <ui:define name="content" >
                <h3>#{trans.searchResult}: "#{searchBean.searchWord}"</h3>
                
                <br />
                
               <h:form id="subjectForm" > 
                <p:dataTable var="sub"  value="#{schoolmat.selectedSchoolMat}">  
                    <f:facet name="header">  
                        #{trans.b_schoolMat}  
                    </f:facet>                    

                    <p:column id="modelHeader" sortBy="#{sub.subject.name}">  
                        <f:facet name="header">  
                            <h:outputText value="#{trans.subject}" />  
                        </f:facet>  
                        <h:outputText value="#{sub.subject.name}" />  
                    </p:column> 
                    
                    <p:column sortBy="#{sub.name}">  
                        <f:facet name="header">  
                            <h:outputText value="#{trans.name}" />  
                        </f:facet>  
                        <h:outputText value="#{sub.name}" />  
                    </p:column> 

                    <p:column sortBy="#{sub.subject.shortcut}">  
                        <f:facet name="header">  
                            <h:outputText value="#{trans.shortcut}" />  
                        </f:facet>  
                        <h:outputText value="#{sub.subject.shortcut}" />  
                    </p:column> 

                    <p:column sortBy="#{sub.subject.department}">  
                        <f:facet name="header">  
                            <h:outputText value="#{trans.department}" />  
                        </f:facet>  
                        <h:outputText value="#{sub.subject.department}" />  
                    </p:column> 

                    <p:column style="width:4%">  
                        <p:commandButton id="selectButton" icon="ui-icon-search" title="View" ajax="false" 
                                         action="#{schoolmat.pickSubject(sub)}">  

                        </p:commandButton>  
                    </p:column> 


                </p:dataTable>  
            </h:form>   
                
                
                
            </ui:define>
        </ui:composition>


</html>
